﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="Comment.aspx.cs" Inherits="Comment" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="ThemSP">
        <table>
            <tr>
                <td>Sản Phẩm
                    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="AccessDataSource1" DataTextField="TenSP" DataValueField="MaSP"></asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT DISTINCT SanPham.TenSP, Commnent.MaSP FROM (Commnent INNER JOIN SanPham ON Commnent.MaSP = SanPham.MaSP)"></asp:AccessDataSource>
                    <asp:Button ID="choncm" runat="server" Text="Chọn" OnClick="choncm_Click" CssClass="myButton" />
                </td>
                <td>
                    <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="AccessDataSource3" DataTextField="MACM" DataValueField="MACM"></asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource3" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT MACM FROM Commnent WHERE (MaSP = ?)">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="MaSP" QueryStringField="MaSP" Type="String" />
                        </SelectParameters>
                    </asp:AccessDataSource>
                    <asp:Button ID="xoacm" runat="server" Text="Xóa" OnClick="xoacm_Click" CssClass="myButton" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DataList ID="DataList1" runat="server" DataKeyField="MACM" DataSourceID="AccessDataSource2">
                        <ItemTemplate>
                            <tr>
                                <td class="td-User">Mã Bình Luận:</td>
                                <td>
                                    <asp:Label ID="MACMLabel" runat="server" Text='<%# Eval("MACM") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Ngày Đăng: </td>
                                <td>
                                    <asp:Label ID="NgayDangLabel" runat="server" Text='<%# Eval("NgayDang") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Nội Dung:</td>
                                <td>
                                    <asp:Label ID="NOIDUNGLabel" runat="server" Text='<%# Eval("NOIDUNG") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td class="td-User">Tên Người Đăng:</td>
                                <td>
                                    <asp:Label ID="TENKHLabel" runat="server" Text='<%# Eval("ID") %>' /></td>
                            </tr>
                        </ItemTemplate>
                    </asp:DataList>
                    <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT [MACM], [NgayDang], [NOIDUNG], [ID] FROM [Commnent] WHERE ([MaSP] = ?)">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="MaSP" QueryStringField="MaSP" Type="String" />
                        </SelectParameters>
                    </asp:AccessDataSource>
                    <a href="Comment.aspx">
                        <asp:Label ID="Label2" runat="server" Text=" "></asp:Label></a>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

